<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
<base href="<%=basePath%>">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>众筹管理后台</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/dashboard.css" />
<link rel="stylesheet" href="css/dialog.css" />
</head>
<body>
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="#">众筹管理平台</a>
			</div>
			<div id="navbar" class="navbar-collapse collapse">

				<ul class="nav navbar-nav navbar-right">
					<li><a href="index.do">首页</a></li>
					<li><a href="javascript:void(0)">欢迎, ${login_admin.adminRealname }</a></li>
					<li><a href="admin/quit.do" title="退出登录">退出</a></li>
				</ul>
			</div>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li><a href="index.do">首页</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="project/queryAll.do">所有项目</a></li>
					<li class="active"><a href="project/queryByType.do">项目审核</a></li>
					<li><a href="javascript:void(0)">项目跟踪</a></li>
					<li><a href="comment/queryAll.do">项目评论</a></li>
					<li><a href="classify/queryAll.do">项目分类</a></li>
					<li><a href="javascript:void(0)">项目推荐</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="user/queryAll.do">注册用户</a></li>
					<li><a href="javascript:void(0)">用户资金</a></li>
					<li><a href="log.do">用户日志</a></li>
					<li><a href="user/queryByRole.do">实名审核</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="javascript:void(0)">新闻管理</a></li>
					<li><a href="problem/queryAll.do">问题管理</a></li>
					<li><a href="admin/queryAll.do">管理用户</a></li>
					<li><a href="managelog.do">管理日志</a></li>
				</ul>
			</div>
			<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <br><br>
		<div class="panel panel-default">
  <div class="panel-heading">
    <div class="panel-title">
    	所有项目列表
    </div>
  </div>
  <div class="panel-body">
   
          <div class="table-responsive ">
            <table class="table table-striped table-bordered">
              <thead>
                <tr>
                  <th>项目ID</th>
                  <th>项目类型</th>
                  <th>项目名称</th>
                  <th>发起人</th>
                  <th>筹资金额</th>
                  <th>筹资天数</th>
                  <th>项目故事</th>
                  <th>关于自己</th>
                  <th colspan="3">操作</th>
                </tr>
              </thead>
              <tbody>
              <c:forEach items="${p.list }" var="project">
                <tr>
                  <td>${project.psId }</td>
                  <td>${project.psPstId }</td>
                  <td>${project.psFile }</td>
                  <td>${project.psUsId }</td>
                  <td>${project.psMoney }￥</td>
                  <td>${project.psDays }</td>
                  <td>${project.psStory }</td>
                  <td>${project.psAboutme }</td>
                  <td><a href = "project/pass.do?ps_id=${project.psId }&&us_id=${project.psUsId }" >通过</a></td>
                  <td><a href="#" data-toggle="modal" 
                          onclick="set_id(${project.psUsId },${project.psId })"     data-target="#myModal" >拒绝</a></td>
                  <td>
                  	<a href="project/queryById.do?psId=${project.psId }">详情</a>
                  </td>
                </tr>
              </c:forEach>  
               
              </tbody>
            </table>
          </div>
          
          <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
                         aria-labelledby="myModalLabel" aria-hidden="true">
                        <div class="modal-dialog">
                            <div class="modal-content">
                                <div class="modal-header">
                                    <button type="button" class="close" data-dismiss="modal"
                                            aria-hidden="true">&times;</button>
                                    <h4 class="modal-title" id="myModalLabel">拒绝原因</h4>
                                </div>
                                <div class="modal-body">
                                    <div class="form">
                                        <form class="form-validate form-horizontal" id="feedback_form"
                                        	 action="project/noPass.do"
                                              method="post">
                                            <div class="form-group ">
                                                <label for="mt_ps_id" class="control-label col-lg-2">项目id<span
                                                        class="required"> *</span></label>
                                                <div class="col-lg-10">
                                                    <input class="form-control" name = "ps_id" id="mt_ps_id" type="text" readonly />
                                                </div>
                                            </div>
                                            <div class="form-group ">
                                                <label for="mt_us_id" class="control-label col-lg-2">用户id<span
                                                        class="required"> *</span></label>
                                                <div class="col-lg-10">
                                                    <input class="form-control" name = "us_id" id="mt_us_id" type="text" readonly />
                                                </div>
                                            </div>
                                            <div class="form-group ">
                                                <label for="p_time" class="control-label col-lg-2">请输入拒绝原因<span
                                                        class="required"> *</span></label>
                                                <div class="col-lg-10">
                                                    <input class="form-control" name = "nopass_cause" type="text" />
                                                </div>
                                            </div>
                                            <div class="form-group" style="text-align: right;">
                                                <div class="col-lg-offset-2 col-lg-10">
                                                    <button class="btn btn-primary" type="submit" >确定</button>
                                                    <button class="btn btn-default" type="reset">重置</button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
  	             <nav aria-label="Page navigation" class="text-center">
							<ul class="pagination">
								<li><a href="project/queryByType.do?tr=${p.prePage }"
									aria-label="Previous"> <span aria-hidden="true">&laquo;</span>
								</a></li>
								<li><span aria-hidden="true">${p.pageNum }/${p.pages }页</span></li>
								<c:if test="${p.pageNum<p.pages }">
								<li><a href="project/queryByType.do?tr=${p.nextPage }"
									aria-label="Next"> <span aria-hidden="true">&raquo;</span>
								</a></li>
								</c:if>
							</ul>
						</nav>   	
  </div>
 

</div>
      
        </div>
		</div>
	</div>

	<script type="text/javascript" src="js/jquery1.12.4.min.js"></script>
	<script type="text/javascript" src="js/dialog.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/countUp.js"></script>
	<script>
	
	
		function set_id(us_id,ps_id){
			 document.getElementById("mt_us_id").value=us_id;
			 document.getElementById("mt_ps_id").value=ps_id;
		}
	
	
	
	
			$(document).ready(function() {
				var options = {  
					useEasing: true,
					  useGrouping: true,
					  separator: ',',
					  decimal: '.',
				};
				var demo = new CountUp('moneyCount', 10000, 208965, 0, 2.5, options);
				if(!demo.error) {  
					demo.start();
				} else {  
					console.error(demo.error);
				}
			});
		</script>


</body>
</html>